import request from '@/utils/request.js'

/**平台订单列表***/
export function getOrderList(data){
    return request({
        url: '/admin/order/list',
        method: 'post',
        data
    })
}
export function getOrderList1(data){
    return request({
        url: '/add/sim/list',
        method: 'post',
        data
    })
}
/**代理商订单列表(微信订单)***/
export function getAgentOrderList(data){
    return request({
        url: '/agent/order/list',
        method: 'post',
        data
    })
}


export function getAgentOrderLists(data){
    return request({
        url: '/agent/sim/data/log',
        method: 'post',
        data
    })
}
export function getSecondOrderList(data){
    return request({
        url: 'secondsreturn',
        method: 'post',
        data
    })
}
export function getAgentRechargeOrderList(data){
    return request({
        url: 'agentRecharge',
        method: 'post',
        data
    })
}
export function getRefundOrderList(data){
    return request({
        url: 'refundOrder',
        method: 'post',
        data
    })
}
export function getRefundOrderDeatil(data){
    return request({
        url: 'refundOrderDeatil',
        method: 'post',
        data
    })
}
export function getAdvanceOrderList(data){
    return request({
        url: 'advance',
        method: 'post',
        data
    })
}

/***预充值***/
export function prechargeForAgent(data){
    return request({
        url: 'order/investOrder/admin/add',
        method: 'post',
        data
    })
}
/***预充值订单**/
export function getPrechargeOrderList(data){
    return request({
        url: 'order/investOrder/listPage',
        method: 'post',
        data
    })
}
/***新增预充值订单**/
export function addPrechargeOrder(data){
    return request({
        url: 'order/investOrder/pc/add',
        method: 'post',
        data
    })
}


/*** 获取支付宝支付码 **/
export function alipayParam(data){
    return request({
        url: 'order/investOrder/pc/payParam',
        method: 'post',
        data
    })
}


/***预充值账户列表**/
export function getAgentAccountList(data){
    return request({
        url: 'agent/account/invest/list',
        method: 'post',
        data
    })
}
/**预充记录***/
export function getPrechargeDetail(data){
    return request({
        url: 'agent/account/flow/list',
        method: 'post',
        data
    })
}
/**预充值余额修改***/
export function decreasePrechargeAmount(data){
    return request({
        url: 'order/investOrder/admin/substract',
        method: 'post',
        data
    })
}
/**预充值余额修改***/
export function changePrechargePwd(data){
    return request({
        url: 'sysConfig/adminPwd/update',
        method: 'post',
        data
    })
}
/**获取秒返记录***/
export function getSecondBackList(data){
    return request({
        url: 'order/agentOrder/back/listPage',
        method: 'post',
        data
    })
}

/** 导出订单 **/
export function exportOrderInfo(data){
    return request({
        url: 'export/orderInfo',
        method: 'post',
        data
    })
}
/** 订单状态字典 **/
export function getOrderStateList(data){
    return request({
        url: 'order/payState/dict',
        method: 'get',
        params: data
    })
}
//订单实名费用列表
export function getRealNamePayList(data){
    return request({
        url: 'bindPhone/query/order/list',
        method: 'post',
        data
    })
}
/** 订单来源字典 **/
export function getOrderSourceList(data){
    return request({
        url: 'order/createType/dict',
        method: 'get',
        params: data
    })
}

export function modifyOrderRemark(data){
    return request({
        url: 'order/modify/orderInfo',
        method: 'post',
        data
    })
}

/** 导出代理商微信订单 */
export function exportAgentOrderInfo(data){
    return request({
        url: 'export/orderAgentOrderInfo',
        method: 'post',
        data
    })
}

/**申请退款**/
export function backMoney(data){
    return request({
        url: 'order/applyRefund',
        method: 'post',
        data
    })
}

/**审核申请退款操作（同意）**/
export function agreeBackMoney(data){
    return request({
        url: 'order/applyRefund/agree',
        method: 'post',
        data
    })
}

/**审核申请退款操作（拒绝）**/
export function unAgreeBackMoney(data){
    return request({
        url: 'order/applyRefund/unAgree',
        method: 'post',
        data
    })
}

/**退款详情**/
export function backMoneyDetail(data){
    return request({
        url: 'pkg/back/money/info/list',
        method: 'post',
        data
    })
}


/**退款申请订单列表**/
export function backMoneyList(data){
    return request({
        url: 'order/applyRefund/listPage',
        method: 'post',
        data
    })
}


/**【订单管理】下的【退款订单】列表**/
export function backListPage(data){
    return request({
        url: 'order/pkgOrder/back/listPage',
        method: 'post',
        data
    })
}


/**代理商退款订单列表**/
export function agentBackMoneyList(data){
    return request({
        url: 'order/agent/back/listPage',
        method: 'post',
        data
    })
}
/****充值订单状态***/
export function resetOrderState(data){
    return request({
        url: 'order/reset/orderStatus',
        method: 'post',
        data
    })
}


/**批量充值订单列表***/
export function getAgentTopUpOrderList(data){
    return request({
        url: 'order/pkgOrder/agent/listPage',
        method: 'post',
        data
    })
}

/**后台充值订单列表***/
export function getBackgroundTopUpOrderList(data){
    return request({
        url: 'order/pkgOrder/backstage/listPage',
        method: 'post',
        data
    })
}



/**代理商【我的订单管理】列表***/
export function getMyOrderMgtList(data){
    return request({
        url: 'order/pkgOrder/agent/myOrder/listPage',
        method: 'post',
        data
    })
}


/**代理商【预充值套餐订单】列表***/
export function getAgentFlowTopUpOrderList(data){
    return request({
        url: 'order/pkgOrder/collect/agent/listPage',
        method: 'post',
        data
    })
}